<%-- 
    Document   : uploadFile
    Created on : 07-jun-2012, 11:36:19
    Author     : Usuario
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>

<HTML>
    <HEAD>
        <TITLE></TITLE>
        <script src="<%=request.getContextPath()%>/bootstrap/js/jquery.js"></script>
        <script type="text/javascript">
            $(document).ready(function() {
                $("#formUploadFile").submit(function(){
                    $.ajax({
                        type: 'POST',
                        url: "<%=request.getContextPath()%>/UploadFile",
                        data: $(this).serialize(),
                        beforeSend:function(){
                            alert("Started!");
                        },
                        success: function(data){
                            alert("Succes!");
                        }
                    })   
                });
            })
        </script>
    </HEAD>
    <BODY>
    <center>
        <form id="formUploadFile" enctype='multipart/form-data'>
            Por favor, seleccione el trayecto del fichero a cargar
            <br><input type="file" name="fichero">
            <input type="submit">
        </form> 
    </center>
</BODY>
</HTML>